/*
 * @lc app=leetcode.cn id=561 lang=csharp
 *
 * [561] 数组拆分
 */

// @lc code=start
public class Solution {
    public int ArrayPairSum(int[] nums) {
        Array.Sort(nums);
        int sum = 0;
        for (int i = 0; i < nums.Length; i += 2)
        {
            sum += nums[i];
        }
        return sum;
    }
}
// @lc code=end

